<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of VMT_ProcessTransects</title>
  <meta name="keywords" content="VMT_ProcessTransects">
  <meta name="description" content="Driver program to process multiple transects at a single cross-section">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2005 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../m2html.css">
  <script type="text/javascript">
    if (top.frames.length == 0) { top.location = "../index.html"; };
  </script>
</head>
<body>
<a name="_top"></a>
<!-- menu.html VMT_4.0_dev -->
<h1>VMT_ProcessTransects
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>Driver program to process multiple transects at a single cross-section</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function [A,V,log_text] = VMT_ProcessTransects(z,A,setends) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment"> Driver program to process multiple transects at a single cross-section
 for velocity mapping.

 Among other things, it:

   Determines the best fit mean cross-section line from multiple transects
   Map ensembles to mean c-s line
   Determine uniform mean c-s grid for vector interpolating
   Determine location of mapped ensemble points for interpolating
   Interpolate individual transects onto uniform mean c-s grid
   Average mapped mean cross-sections from individual transects together 
   Rotate velocities into u, v, and w components

 (adapted from code by J. Czuba)

 P.R. Jackson, USGS, 12-9-08 
 Last modified: F.L. Engel, USGS, 2/20/2013</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="VMT_CompMeanXS.html" class="code" title="function [A,V,log_text] = VMT_CompMeanXS(z,A,V)">VMT_CompMeanXS</a>	Computes the mean cross section data from individual transects</li><li><a href="VMT_CompMeanXS_PriSec.html" class="code" title="function [A,V,log_text] = VMT_CompMeanXS_PriSec(z,A,V)">VMT_CompMeanXS_PriSec</a>	Computes the mean cross section velocity components (Primary</li><li><a href="VMT_CompMeanXS_UVW.html" class="code" title="function [A,V] = VMT_CompMeanXS_UVW(z,A,V)">VMT_CompMeanXS_UVW</a>	Computes the mean cross section velocity components (U,V,W)</li><li><a href="VMT_GridData2MeanXS.html" class="code" title="function [A,V] = VMT_GridData2MeanXS(z,A,V,unitQcorrection)">VMT_GridData2MeanXS</a>	This routine generates a uniformly spaced grid for the mean cross section and</li><li><a href="VMT_MapEns2MeanXS.html" class="code" title="function [A,V,log_text] = VMT_MapEns2MeanXSV2(z,A,setends)">VMT_MapEns2MeanXS</a>	Fits multiple transects at a single location with a single</li><li><a href="VMT_Rozovskii.html" class="code" title="function [V,log_text] = VMT_Rozovskii(V,A)">VMT_Rozovskii</a>	Computes the frame of reference transpositon as described in Kenworthy</li></ul>
This function is called by:
<ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="VMT.html" class="code" title="function varargout = VMT(varargin)">VMT</a>	--- THE VELOCITY MAPPING TOOLBOX ---</li></ul>
<!-- crossreference -->



<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function [A,V,log_text] = VMT_ProcessTransects(z,A,setends)</a>
0002 <span class="comment">% Driver program to process multiple transects at a single cross-section</span>
0003 <span class="comment">% for velocity mapping.</span>
0004 <span class="comment">%</span>
0005 <span class="comment">% Among other things, it:</span>
0006 <span class="comment">%</span>
0007 <span class="comment">%   Determines the best fit mean cross-section line from multiple transects</span>
0008 <span class="comment">%   Map ensembles to mean c-s line</span>
0009 <span class="comment">%   Determine uniform mean c-s grid for vector interpolating</span>
0010 <span class="comment">%   Determine location of mapped ensemble points for interpolating</span>
0011 <span class="comment">%   Interpolate individual transects onto uniform mean c-s grid</span>
0012 <span class="comment">%   Average mapped mean cross-sections from individual transects together</span>
0013 <span class="comment">%   Rotate velocities into u, v, and w components</span>
0014 <span class="comment">%</span>
0015 <span class="comment">% (adapted from code by J. Czuba)</span>
0016 <span class="comment">%</span>
0017 <span class="comment">% P.R. Jackson, USGS, 12-9-08</span>
0018 <span class="comment">% Last modified: F.L. Engel, USGS, 2/20/2013</span>
0019 
0020 <span class="comment">% FIXME: Hard coded unitQ for now (FLE)</span>
0021 unitQcorrection = false;
0022 
0023 log_text = {<span class="string">'   Processing Data...Please Be Patient.'</span>};
0024 
0025 <span class="keyword">try</span>
0026     <span class="comment">%disp('Processing Data...')</span>
0027     warning off
0028         
0029     <span class="comment">%% Map ensembles to mean cross-section</span>
0030     [A,V,map_xs_log_text] = <a href="VMT_MapEns2MeanXS.html" class="code" title="function [A,V,log_text] = VMT_MapEns2MeanXSV2(z,A,setends)">VMT_MapEns2MeanXS</a>(z,A,setends);
0031     <span class="comment">%msgbox('Processing Data...Please Be Patient','VMT Status','help','replace');</span>
0032     log_text = vertcat(log_text, map_xs_log_text);
0033     
0034     <span class="comment">%% Set the probe type</span>
0035     <span class="comment">%V.probeType = A(1).probeType;</span>
0036     V.probeType = <span class="string">'RG'</span>;
0037     
0038     <span class="comment">%% Grid the measured data along the mean cross-section</span>
0039     <span class="comment">%[A,V] = VMT_GridData2MeanXS(z,A,V);</span>
0040     [A,V] = <a href="VMT_GridData2MeanXS.html" class="code" title="function [A,V] = VMT_GridData2MeanXS(z,A,V,unitQcorrection)">VMT_GridData2MeanXS</a>(z,A,V,unitQcorrection);
0041     <span class="comment">%msgbox('Processing Data...Please Be Patient','VMT Status','help','replace');</span>
0042     <span class="comment">%log_text = {log_text; grid_data_log_text};</span>
0043 
0044     <span class="comment">%% Computes the mean data for the mean cross-section</span>
0045     <span class="comment">%[A,V] = VMT_CompMeanXS(z,A,V);</span>
0046     [A,V,comp_xs_log_text] = <a href="VMT_CompMeanXS.html" class="code" title="function [A,V,log_text] = VMT_CompMeanXS(z,A,V)">VMT_CompMeanXS</a>(z,A,V);
0047     <span class="comment">%msgbox('Processing Data...Please Be Patient','VMT Status','help','replace');</span>
0048     log_text = vertcat(log_text, comp_xs_log_text);
0049 
0050     <span class="comment">%% Decompose the velocities into u, v, and w components</span>
0051     [A,V] = <a href="VMT_CompMeanXS_UVW.html" class="code" title="function [A,V] = VMT_CompMeanXS_UVW(z,A,V)">VMT_CompMeanXS_UVW</a>(z,A,V);
0052     <span class="comment">%msgbox('Processing Data...Please Be Patient','VMT Status','help','replace');</span>
0053 
0054     <span class="comment">%% Decompose the velocities into primary and secondary components</span>
0055     [A,V,comp_prisec_log_text] = <a href="VMT_CompMeanXS_PriSec.html" class="code" title="function [A,V,log_text] = VMT_CompMeanXS_PriSec(z,A,V)">VMT_CompMeanXS_PriSec</a>(z,A,V);
0056     <span class="comment">%msgbox('Processing Data...Please Be Patient','VMT Status','help','replace');</span>
0057     log_text = vertcat(log_text, comp_prisec_log_text);
0058 
0059     <span class="comment">%% Perform the Rozovskii computations</span>
0060     [V,roz_log_text] = <a href="VMT_Rozovskii.html" class="code" title="function [V,log_text] = VMT_Rozovskii(V,A)">VMT_Rozovskii</a>(V,A);
0061     log_text = vertcat(log_text, roz_log_text);
0062     
0063     <span class="comment">%figure(4); clf</span>
0064     <span class="comment">%plot3(V.mcsX,V.mcsY,V.mcsDepth(1))</span>
0065     <span class="comment">%disp('Processing Completed')</span>
0066     log_text = vertcat(log_text, <span class="string">'   Processing Completed.'</span>);
0067 <span class="keyword">catch</span> err
0068     erstg = {<span class="string">'An unexpected error occurred during processing. Execution stopped.'</span>};
0069     errordlg(erstg,<span class="string">'VMT Status'</span>,<span class="string">'replace'</span>);
0070     log_text = vertcat(log_text, erstg);
0071     rethrow(err)
0072     <span class="keyword">return</span>
0073 <span class="keyword">end</span>
0074 
0075 
0076 <span class="comment">%% Notes:</span>
0077 
0078 <span class="comment">%1. I removed scripts at the end of the original code that computes</span>
0079 <span class="comment">%standard deviations (12-9-08)</span></pre></div>
<hr><address>Generated on Thu 21-Mar-2013 09:32:01 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" target="_parent">m2html</a></strong> &copy; 2005</address>
</body>
</html>